﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TerminalGroups.aspx.cs" Inherits="HNQXYJ.HN_AreaGroup.TerminalGroups" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../Scripts/jquery-1.5.1.js" type="text/javascript"></script>
     <link href="../CSS/public.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/SimpleContent.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
        $(function () {
            
            $.post("../BLL/AreaGroupASH.ashx", { "action": "GetGroupList" }, function (data, status) {
                if (status == "success") {
                    var group = $.parseJSON(data);
                    for (var i = 0; i < group.length; i++) {
                        var areaCode = group[i].AreaCode;
                        var name = group[i].Name;
                        var option = '<option value=' + areaCode + '>' + name + '</option>';
                        $("#selectArea").append(option);
                    }
                   // $("#selectArea").val($("#HidGroup").val());
                }
            });

            $("#selectArea").change(function () {
                var groupCode = $(this).val();
                $("#HidGroup").val(groupCode);
            });

        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
     <table width="100%" border="0" cellspacing="0" cellpadding="0" height="610">
                    <tr>
                        <td class="rtbg">
                            <span> 终端号码分组 &nbsp;》
                              </span>
                        </td>
                    </tr>
                    <tr>
                        <td  class="rbg" valign="top" align="center"  style="padding-top:20px">
                            
                             <table class="dataList" cellpadding="0" cellspacing="0" width="97%">
                                    <caption>GPRS信息群发</caption>
                                      <tr>
                                        <td class="Graybgr" width="10%">请选择一个组：</td>
                                        <td class="Lightbluebg" width="90%">
                                          <select id="selectArea"  runat="server">
                                           <option selected="selected"  value=""> 请选择一个组&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>         
                                           </select><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="selectArea"
                                              ErrorMessage="*"></asp:RequiredFieldValidator>

                                           <a href="AreaGroupAdd.aspx"  >添加新组</a>
                                        </td>
                                      </tr>
                                      <tr>
                                        <td class="Graybgr" width="10%">终端号码：</td>
                                        <td class="Lightbluebg" width="90%">
                                            <asp:TextBox ID="txtPhones" runat="server" TextMode="MultiLine" Width="27%" 
                                                Height="300px" ></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1"
                                                    runat="server" ErrorMessage="*" ControlToValidate="txtPhones"></asp:RequiredFieldValidator>
                                        </td>
                                      </tr>                                 
                                      <tfoot>
                                        <tr>
                                           <td colspan="2" style=" text-align:left "> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img id="reset" src="../images/qk.gif" />&nbsp;&nbsp;&nbsp;
                                               <%--<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="../images/send.jpg" 
                                                   onclick="ImageButton1_Click" />--%>
                                                   <asp:ImageButton ID="Save" runat="server"  ImageUrl="~/img/bc.gif" 
                                                   onclick="Save_Click" />
                                         &nbsp;
                                               <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
                                         </td>
                                        </tr>
                                      </tfoot>
                               </table>
                         </td>
                     </tr>
              </table>
    <input id="HidGroup" type="hidden"  value=""  runat="server"/>
    </form>
</body>
</html>
